package test;


import java.sql.Timestamp;
import java.util.Date;

public class oldman extends OLDMANDETIAL {
	private int idoldman;
	private double longitudeoldman;
	private double latitudeoldman;
	private long locationtimeoldman;

	
	public int update(int id,double latitude,double longitude){
		idoldman=id;
		longitudeoldman=longitude;
		latitudeoldman=latitude;
		
		Date i=new Date();
		locationtimeoldman=i.getTime();
		
		
		String SQL = "update OLDMANDETIAL set longitudeoldman=?,latitudeoldman=?,locationtimeoldman=? where idoldman=?";
		Object parameter[] = {  longitudeoldman,
				latitudeoldman,locationtimeoldman,  idoldman };
		
		return super.excuteUpdate(SQL, parameter);
		
	}
	public String[][] selectCareToOld(int idcaregiver) {
		String SQL = "select * from OLDMANDETIAL where idcaregiver=?";
		Object parameter[] = { idcaregiver };
		return super.select(SQL, parameter);
	}
	
}
